package cc.bookcloud.tool.ocr.common.excel;

import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;

public class SQLUtils {
    public static void writeToSql(String content, String path) {
        FileOutputStream outSTr = null;
        BufferedOutputStream Buff = null;
        String path1 = path;
        try {
            File file = new File(path);
            File file1 = new File(file.getParent());
            if (!file1.exists()) {
                file1.mkdir();
            }
            outSTr = new FileOutputStream(file);
            Buff = new BufferedOutputStream(outSTr);
            Buff.write(content.getBytes("UTF-8"));

            Buff.flush();
            Buff.close();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                Buff.close();
                outSTr.close();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
}